package com.llb666.shop.order.infrastructure.mapper;

import com.llb666.common.core.tk.mapper.MyMapper;
import com.llb666.shop.order.api.vo.center.MyOrdersVo;
import com.llb666.shop.order.domain.entity.OrderStatus;
import com.llb666.shop.order.infrastructure.po.OrdersPo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author llb666
 */
@Repository
public interface OrdersMapper extends MyMapper<OrdersPo> {

    /**
     * 查询订单列表信息.
     *
     * @param userId      用户id
     * @param orderStatus 订单状态
     * @return 我的订单列表
     */
    List<MyOrdersVo> getOrderByUserIdAndStatus(String userId, Integer orderStatus);

    /**
     * 根据用户查询订单动向.
     *
     * @param userId 用户id
     * @return 订单状态列表
     */
    public List<OrderStatus> getMyOrderTrend(@Param("userId") String userId);


}